#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int dosage = 0;
    double price = 0.0;
    scanf("%d", &dosage);
    if (dosage <= 15)
    {
        price = 4 * dosage / 3.0;
    }
    else
    {
        price = 2.5 * dosage - 17.5;
    }
    printf("%.2lf", price);
    return 0;
}